Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for 'file_encoding' option #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

staticssleever668
Copy link

Following telescope.builtin.live_grep().

NOTE: grep_previewer already uses this option.

Description

Implements 'file_encoding' option like in telescope.builtin.live_grep().
Without this previewer converts and breaks encoding, so this is also a bug fix.
The option is documented in telescope.builtin.live_grep(), so I didn't touch README.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

echo КОТ > utf-8
echo КОТ | iconv -t cp866 > cp866

telescope.extensions.live_grep_args.live_grep_args({file_encoding = "cp866"}) typing КОТ finds 'cp866'.
telescope.extensions.live_grep_args.live_grep_args({}) typing КОТ finds 'utf-8'.

Configuration:

  • Neovim version (nvim --version): v0.10.1
  • Operating system and version: NixOS 24.05 + unstable

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations)

Following telescope.builtin.live_grep().

NOTE: grep_previewer already uses this option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant